<section ng-controller="fetchSearchController">
    <!--<form name="searchForm" novalidate>-->
        <!--<div ng-show="enableSearch" scroll class="form-group input-search">-->
            <!--<div class="col-xs-12">-->
                <!--<input type="text" class="form-control" name="keyword"-->
                       <!--ng-init="keyword = ''" ng-model="keyword" ng-blur="enableSearch = false"-->
                       <!--placeholder="搜索人名/岗位等所有关键词">-->
            <!--</div>-->
        <!--</div>-->
    <!--</form>-->

    <div class="container col-thin">
        <div class="row">
            <div class="col-xs-4">
                <a href="#" class="logo"></a>
            </div>
            <div class="col-xs-8 col-header col-thin">
                <h4>我要接活</h4>
                <p>
                    <empty name="Think.session.loginUser">
                        使用全部功能请<a href="<{:U('Login/index')}>">&nbsp;登 陆&nbsp;</a>或<a href="<{:U('Register/index')}>">&nbsp;注 册</a></p>
                    <else />
                    聚焦影视圈工作机会
                    </empty>
                </p>
            </div>
        </div>
        <form name="searchForm" novalidate>
            <!--<div class="form-group">-->
                <div class="col-xs-12 col-search">
                    <input type="text" class="form-control" name="keyword"
                           ng-init="keyword = ''" ng-model="keyword" onchange="angular.element(this).scope().search(); this.blur();"
                           placeholder="搜索人名/岗位等所有关键词">
                </div>
            <!--</div>-->
        </form>

        <!-- Preference Panel Controls -->
        <div class="col-normal" ng-init="inputPrefer = 0">
            <div class="row" ng-hide="inputPrefer == 1" ng-click="inputPrefer = 1; toggle();">
                <div class="col-xs-12 li-arrow">
                    <dl class="dl-modify">
                        <dt><h5>岗位、时限筛选</h5></dt>
                        <dd>{{ preferJobsMeaning }}&nbsp;
                            <br ng-show="preferJobs && preferDurations"/>
                            {{ preferDurationMeaning }}</dd>
                    </dl>
                </div>
            </div>

            <input type="hidden" ng-model="preferJobs">
            <input type="hidden" ng-model="preferDurations">
            <div ng-show="inputPrefer == 1">
                <div class="row">
                    <!-- Job Preference -->
                    <div class="col-xs-12">
                        <h5>岗位筛选(可多选)</h5>
                        <div class="panel-scroll-down" ng-hide="scroll">
                            <a href="#" class="text-tips" ng-click="toggle()"><span class="icon-arrow-down">更多</span></a>
                        </div>
                        <ul class="ul-tag">
                            <li ng-repeat="job in jobs | limitTo:limit" ng-class="{active: job.active == true}" ng-click="jobClick($index)">
                                {{ job.stat_name }}
                            </li>
                        </ul>

                    </div>
                </div>
                <!-- Duration Preference -->
                <div id="panelDuration" ng-show="scroll">
                    <hr/>
                    <div class="row">
                        <div class="col-xs-12">
                            <h5>时限(可多选)</h5>
                            <ul class="ul-tag">
                                <li ng-repeat="duration in durations" ng-class="{active: duration.active == true}" ng-click="durationClick($index)">
                                    {{ duration.name }}
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12 center">
                            <a role="button" href="#" class="btn btn-default btn-search" ng-click="search(); toggle(); inputPrefer = 0">开始精准搜索</a>
                            <div class="panel-scroll-up">
                                <a href="#" class="text-tips" ng-click="toggle()"><span class="icon-arrow-up"></span></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <hr/>
        <div class="row">
            <div class="col-xs-12">
                <h5>岗位信息</h5>
                <ul class="ul-normal ul-mission">
                    <li ng-repeat="mission in missions">
                        <a class="text-link" href="<{:U('Task/index')}>/mission/{{ mission.mission_id }}">
                            <h4>
                                {{ mission.mission_name }}
                            </h4>
                        </a>
                            <div class="row">
                                <div class="col-xs-12 col-mission-info tag-group">
                                    <a href="<{:U('FetcherInfo/index')}>/user_id/{{ mission.publisher_id }}">
                                        <span class="text-name">{{ mission.publisher_name }}</span>
                                    </a>
                                    <span ng-show="mission.trust == 2" class="tag-credit">信</span>
                                    <span class="tag-level-first">甲.V{{ mission.level_j }}</span>
                                    <span class="text-tips">{{ getTimePast(mission.publish_time) }}</span>
                                </div>
                            </div>
                        <a class="text-link" href="<{:U('Task/index')}>/mission/{{ mission.mission_id }}">
                            <div class="row wrap-col-cont">
                                <div class="col-xs-12">
                                    <dl class="dl-horizontal-single">
                                        <dt><span class="text-salary">薪酬范围</span></dt>
                                        <dd><span class="text-salary">{{ mission.salary }}&nbsp;</span></dd>
                                        <dt>岗位需求</dt>
                                        <dd>{{ mission.jobs }}&nbsp;</dd>
                                        <dt>工作时限</dt>
                                        <dd>{{ mission.durationMeaning }}&nbsp;</dd>
                                        <dt>工作地点</dt>
                                        <dd>{{ mission.location }}&nbsp;</dd>
                                    </dl>
                                </div>
                            </div>
                        </a>
                    </li>

                </ul>
            </div>
        </div>
    </div>
    <div id="scrollTop" class="scroll-top">

    </div>
</section>
